//
//  BaseNavigationController.swift
//  HuaYun
//
//  Created by enghou on 2018/12/6.
//  Copyright © 2018 xyxorigation. All rights reserved.
//

import UIKit

class BaseNavigationController: UINavigationController {

    override var preferredStatusBarStyle: UIStatusBarStyle{
        get{
            return self.topViewController?.preferredStatusBarStyle ?? .default
        }
    }
    
    override func popViewController(animated: Bool) -> UIViewController? {
        NotificationCenter.default.post(name: NSNotification.Name.init(rawValue: "REFRESHBADGE"), object: nil)
        return super.popViewController(animated: animated)
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    */

}
